package me.may.money.command.subcommand;

import org.bukkit.command.CommandSender;

import me.may.money.api.MoneyAPI;
import me.may.money.util.SubCommand;

public class LookCommand implements SubCommand {

	public boolean execute(CommandSender sender, String[] args) {
		if(args.length != 2) {
			sender.sendMessage("§8[§6交子§8] §e>> §c参数不正确");
			return true;
		}
		if(MoneyAPI.hasMoneyAccount(args[1])) {
			sender.sendMessage("§8[§6交子§8] §e>> §7玩家 §6" + args[1] + " §7拥有交子 §a" + MoneyAPI.getPlayerMoney(args[1]) + " §7两");
			return true;
		}
		return false;
	}
	
}
